<?php

/**
 * This file is part of the Pagizer package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @copyright   Copyright (c) 2010 Advisa (http://www.advisa.fr)
 * @author      Pagizer Core Team <team@pagizer.org>
 * @package     Pagizer
 * @subpackage  backoffice
 */

/**
 * Ajax action to delete a temporary document (table f_temp)
 * 
 * @example module=backoffice&action=AjaxDeleteTempDocument&documentId=12
 */
class m_backoffice_actions_AjaxDeleteTempDocumentAction extends m_backoffice_extends_Action
{
	public function execute()
	{
		$documentId = $this->getRequestParameter("documentId");
		$documentLang = $this->getRequestParameter("documentLang");
		
		$tempDocService = m_backoffice_services_TempDocService::getInstance();
		
		$tempDocService->deleteTempDocument($documentId, $documentLang);
	}	
	
	public function errorHandler()
	{
		return null;
	}
}